package groupb6.shopsystem.service.impl;

import groupb6.shopsystem.mapper.ComplaintMapper;
import groupb6.shopsystem.pojo.entity.*;
import groupb6.shopsystem.service.CustomerComplaintService;
import groupb6.shopsystem.util.JWTUtil;
import groupb6.shopsystem.util.enums.ResponseEnum;
import groupb6.shopsystem.util.response.ResponseException;
import groupb6.shopsystem.util.response.UniversalResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CustomerComplaintServiceImpl implements CustomerComplaintService {
    @Autowired
    private ComplaintMapper complaintMapper;
    @Override
    public UniversalResponse<?> addComplaint(Complaint complaint) {
        complaintMapper.insertComplaint(complaint.getUserId(), complaint.getContent(), complaint.getStatus());
        return new UniversalResponse<>(ResponseEnum.SUCCESS.getCode(), ResponseEnum.SUCCESS.getMsg());
    }
}
